# 切换到 Nginx 阶段
FROM nginx:alpine

# 将构建好的应用复制到 Nginx 的默认静态文件目录
COPY ./dist /usr/share/nginx/html/
# 用本地的 nginx.conf 配置来替换nginx镜像里的默认配置
COPY ./nginx.conf /etc/nginx/nginx.conf

# 暴露端口 80
EXPOSE 80

# 启动 Nginx
CMD ["nginx", "-g", "daemon off;"]